#ifndef COMMONDATATYPES_H
#define COMMONDATATYPES_H

/*
A two (2) dimensional equation.
*/

#include <math.h>
#include <irrlicht.h>


//using namespace irr;

namespace MarCore
{

class equation2df : public irr::IReferenceCounted
{

    public:

        //! Constructor
        equation2df( irr::f32 powerx, irr::f32 addx, irr::f32 multiplyx );

        //! Deconstructor
        ~equation2df();

        //! Takes an X value, then solves and returns the Y.
        const float solveWithX( irr::f32 X_ );

        //! Takes an Y value, then solves and returns the X.
        const float solveWithY( irr::f32 Y_ );

    private:

        //PEMDAS?

        irr::f32 powerX; //what power to raise it to

        irr::f32 addX; //what to add to it

        irr::f32 multiplyX; //what to multiply it by

        // reversed Xs for Y

        irr::f32 powerY; //what power to raise it to

        irr::f32 addY; //what to add to it

        irr::f32 multiplyY; //what to multiply it by



        //solving internally for Y

        const float addEqX ( irr::f32 X_ );

        const float multiplyEqX ( irr::f32 X_ );

        const float powerEqX ( irr::f32 X_ );

        //solvin internally for X

        const float addEqY ( irr::f32 Y_ );

        const float multiplyEqY ( irr::f32 Y_ );

        const float powerEqY ( irr::f32 Y_ );

}; //end class equation2df

}; //end namespace MarCore

#endif
